package com.atguigu.gmall.feign.ware;

import org.apache.ibatis.annotations.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * WareFeignClient  保存当前接口的配置, name或者value是作为配置保存用的key
 *      Map<Strinig FeignCon> map = new HashMap<>();
 *      //每一个要起一个唯一名字
 */
@FeignClient(url = "http://localhost:20000",name = "ware-manage") //固定地址
public interface WareFeignClient {

    @GetMapping("/hasStock")
    String hasStock(@RequestParam("skuId") Long skuId,
                     @RequestParam("num") Integer num);
}
